package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Map;

/**
 * 用户mapper
 */
@Mapper
public interface UserMapper {
    /**
     * 根据openid获取用户
     */
    User getByOpenId(String openId);

    /**
     * 添加用户
     */
    void add(User user);

    User getById(Long currentId);

    Integer countNewUser();

    Integer getNewUserByDate(LocalDate begin);

    Integer getTotalUserListBeforeDate(LocalDate begin);

    Integer countByMap(LocalDateTime begin, LocalDateTime end, Integer status);
}
